Bug 555109 – selection broken when typeahead active
authorKristian Rietveld <kris@gtk.org>
Thu, 30 Jul 2009 18:22:45 +0000 (20:22 +0200)
committerKristian Rietveld <kris@gtk.org>
Thu, 30 Jul 2009 18:24:31 +0000 (20:24 +0200)
gtk_tree_view_enter_notify() now "ignores" the synthesized crossing
events.  The synthesized crossing events always have (0, 0) as
coordinates, which messes things up.  This patch does not fix all issues,
at least it makes the behavior much more reasonable again.  Watch bug
555109 for further discussion on the issue.

gtk/gtktreeview.c

index 2cd794b01dad4221c00048d6b9bb9891ea4c5139..f090a74df2cfa0d3094f66ddf460f84fb5d98650 100644 (file)
@@ -5473,6 +5473,12 @@ gtk_tree_view_enter_notify (GtkWidget        *widget,
   if (tree_view->priv->tree == NULL)
     return FALSE;
 
+  if (event->mode == GDK_CROSSING_GRAB ||
+      event->mode == GDK_CROSSING_GTK_GRAB ||
+      event->mode == GDK_CROSSING_GTK_UNGRAB ||
+      event->mode == GDK_CROSSING_STATE_CHANGED)
+    return TRUE;
+
   /* find the node internally */
   new_y = TREE_WINDOW_Y_TO_RBTREE_Y(tree_view, event->y);
   if (new_y < 0)